package com.wxy.gks.springbootprojectday22practice.service.serviceImpl;

import com.wxy.gks.springbootprojectday22practice.bean.Dept;
import com.wxy.gks.springbootprojectday22practice.dao.DeptMapper;
import com.wxy.gks.springbootprojectday22practice.service.DeptService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Transactional
@Service
public class DeptServiceImpl implements DeptService{
    @Autowired
    private DeptMapper deptMapper;

    @Override
    public List<Dept> findAll() {
        List<Dept> depts = deptMapper.findAll();
        return depts;
    }
}
